package com.rem.controller;

import com.rem.pojo.Role;
import com.rem.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author remembrance
 * @version 1.0
 * @date 2021/11/18 16:38
 */
@RestController
public class RoleController {

    @Autowired
    RoleService roleService;

    @GetMapping("/role")
    public Role getRoleById(@RequestParam("id")Integer id){
        Role role = roleService.getById(id);
        return role;
    }
}
